Spread Silverlight Documentation
SavePdf(Stream,Int32[]) Method
Example 


GrapeCity.Windows.SpreadSheet.UI Namespace > GcSpreadSheet Class > SavePdf Method : SavePdf(Stream,Int32[]) Method
Stream to which to save the data.
The sheet indexes collection.
Saves the content of the component to the specified stream.
Syntax
'Declaration
 
Public Overloads Sub SavePdf( _
   ByVal stream As System.IO.Stream, _
   ByVal ParamArray sheetIndexes() As System.Integer _
) 
'Usage
 
Dim instance As GcSpreadSheet
Dim stream As System.IO.Stream
Dim sheetIndexes() As System.Integer
 
instance.SavePdf(stream, sheetIndexes)
public void SavePdf( 
   System.IO.Stream stream,
   params System.int[] sheetIndexes
)

Parameters

stream
Stream to which to save the data.
sheetIndexes
The sheet indexes collection.
Example
This example uses the SavePdf method.
SaveFileDialog saveFileDialog = new SaveFileDialog();
saveFileDialog.Filter = "PDF File (.pdf)|*.pdf";
bool? useClick = saveFileDialog.ShowDialog();
if (useClick == true)
{
    var stream = saveFileDialog.OpenFile();

GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings test;
test = new GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings();
test.Title = "Print PDF";
test.Author = "GrapeCity, Inc.";
test.DisplayDocTitle = true;
test.FitWindow = true;
gcSpreadSheet1.SavePDF(stream, 0);
//gcSpreadSheet1.SavePDF(stream, test, 0);
 stream.Dispose();
}
Dim saveFileDialog = New SaveFileDialog()
saveFileDialog.Filter = "PDF File(.pdf)|*.pdf"
Dim useClick As Boolean = saveFileDialog.ShowDialog()
If (useClick = True) Then
Dim stream = saveFileDialog.OpenFile()

Dim test As New GrapeCity.Windows.SpreadSheet.Data.PdfExportSettings()
test.Title = "Print PDF"
test.Author = "GrapeCity, Inc."
test.DisplayDocTitle = True
test.FitWindow = True
GcSpreadSheet1.SavePDF(stream, 0)
'GcSpreadSheet1.SavePDF(stream, test, 0)
End If
See Also

Reference

GcSpreadSheet Class
GcSpreadSheet Members
Overload List